package com.naiterui.ehp.bs.doctor.repository;

import com.naiterui.common.repository.core.BaseJpaRepository;
import com.naiterui.ehp.bp.domain.DrFollowUpForm;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * 随访表单
 *
 * @author yangfuya
 * @since 2022/1/5
 */
@Repository
public interface IDrFollowUpFormRepository extends BaseJpaRepository<DrFollowUpForm, Long> {

    /**
     * 分页获取随访表单列表
     *
     * @param type
     * @param delFlag
     * @param pageable
     * @return
     */
    Page<DrFollowUpForm> findByTypeAndDelFlagAndStatus(Integer type, Integer delFlag, Integer status,
                                                       Pageable pageable);

    /**
     * 根据id集合获取表单
     *
     * @param idSet
     * @return
     */
    List<DrFollowUpForm> findAllByIdIn(Set<Long> idSet);

    /**
     * 随访问卷名称模糊搜索
     *
     * @param formName
     * @param delFlag
     * @param status
     * @param pageable
     * @return
     */
    Page<DrFollowUpForm> findByNameLikeAndDelFlagAndStatus(String formName, Integer delFlag, Integer status, Pageable pageable);


}
